<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: igamma</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: igamma</td>
      <td class="subheader-left"><a href="matlab:open igamma">View code for igamma</a></td>
    </tr>
  </table>
<h1>igamma</h1><p><span class="helptopic">correction</span></p><strong>out</strong> = <span style="color:red>igamma</span>(<strong>im</strong>, <strong>gamma</strong>) is a gamma corrected version of <strong>im</strong>.  All pixels
are raised to the power <strong>gamma</strong>.  Gamma encoding can be performed with
<strong>gamma</strong> &amp;gt; 1 and decoding with <strong>gamma</strong> &amp;lt; 1.

<strong>out</strong> = <span style="color:red>igamma</span>(<strong>im</strong>, 'sRGB') is a gamma decoded version of <strong>im</strong> using the sRGB
decoding function (JPEG images sRGB encoded).

<h2>Notes</h2>
<ul>
  <li>Gamma encoding is typically performed in a camera with GAMMA=0.45.</li>
  <li>Gamma decoding is typically performed in the display with GAMMA=2.2.</li>
  <li>For images with multiple planes the gamma correction is applied to all
planes.</li>
  <li>For images of type double the pixels are assumed to be in the range 0 to 1.</li>
  <li>For images of type int the pixels are assumed in the range 0 to max integer
value.</li>
</ul>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2011 Peter Corke.</p>
</body></html>